'Example Program for Model 2400 SourceMeter Series 'This program will demonstrate how to configure 2400 Series product as a constant current 'sink. It will also demonstrate how to program a source memory sweep. The first sweep point 'is to sink 340mA (same as sourcing -340mA) with a source delay of 15 min. The second sweep 'point is to sink 20mA (same as sourcing -20mA) with a source delay of 135 min. 'Note that this program utilizes service request (SRQ) on buffer full. This works for 'GPIB communication only. The instrument must be serial polled to check for a SRQ. *RST 'Reset instrument *CLS 'Clear instrument status :OUTP:SMODE HIMP 'Use high impedance output off-state (IMPORTANT! refer to page 3-20 in 2400 Series User's Manual) *SRE 1 'Enable service request generation :STAT:MEAS:ENAB 512 'SRQ on buffer full :FORM:ELEM VOLT,CURR,TIME 'Format return data string 'Begin configuration on memory location 1 :SOUR:FUNC CURR 'Configure instrument to source current :SOUR:CURR -0.340 'Set source to -.34A :SENS:FUNC 'VOLT' 'Measure voltage :SENS:VOLT:NPLC 0.01 'Set integration rate on voltage measurement = 0.01 PLC :SENS:VOLT:PROT 15 'Set voltage compliance to 15V (IMPORTANT! must be greater than external voltage, see pg. 3-19 to 3-20 in User's manual) :SENS:VOLT:RANG 20 'Set fixed measurement range (optional) :SOUR:DEL 900 'Set source delay = 900 sec = 15 min :SOUR:MEM:SAVE 1 'Save present SourceMeter configuration in source memory location 1 'Begin configuration on memory location 2 :SOUR:FUNC CURR 'Configure instrument to source current :SOUR:CURR -0.02 'Set source to -0.02A :SENS:FUNC 'VOLT' 'Measure voltage :SENS:VOLT:NPLC 0.01 'Set integration rate on voltage measurement = 0.01 PLC :SENS:VOLT:PROT 15 'Set voltage compliance to 15V (IMPORTANT, see pages 3-19 to 3-20 in User's Manual) :SENS:VOLT:RANG 20 'Set fixed measurement range (optional) :SOUR:DEL 8100 'Set source delay = 8100 sec = 135 min :SOUR:MEM:SAVE 2 'Save present SourceMeter configuration in source memory location 2 'Configure global instrument settings :ARM:SOUR IMM 'Set arm source = immediate (default) :ARM:COUN 5 'Set arm count = 5 (This is the number of times you would like to make complete sweep cycles) :TRIG:SOUR IMM 'Set trigger layer source = immediate (default) :TRIG:COUN 2 'Set trigger count = 2 (MUST equal number of points in source memory sweep) :TRAC:POIN 10 'Configure buffer size = 10 readings = trigger count * arm count :TRAC:FEED SENS 'Store readings in buffer :TRAC:TST:FORM DELT 'Buffer timestamp format = delta :TRAC:FEED:CONT NEXT 'Enable buffer storage :SOUR:FUNC MEM 'Source function mode = source memory sweep :SOUR:MEM:POIN 2 '2 points in source memory sweep (MUST equal trigger count) :SOUR:MEM:STAR 1 'Start at source memory location 1 :OUTP ON 'Turn on instrument output :INIT 'Intialize and begin source memory sweep 'On SRQ :TRAC:DATA? 'Query entire instrument buffer (Enter in data from instrument) :OUTP OFF 'Turn off instrument output *SRE 0 'Reset SRQ bit.